/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package podologia.beansDB;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Hernan
 */
@Entity
@Table(name = "cardedoxatencion")
@NamedQueries({@NamedQuery(name = "Cardedoxatencion.findByObservacion", query = "SELECT c FROM Cardedoxatencion c WHERE c.observacion = :observacion"), @NamedQuery(name = "Cardedoxatencion.findByIdCarDedoxAtencion", query = "SELECT c FROM Cardedoxatencion c WHERE c.idCarDedoxAtencion = :idCarDedoxAtencion"), @NamedQuery(name = "Cardedoxatencion.findByD1", query = "SELECT c FROM Cardedoxatencion c WHERE c.d1 = :d1"), @NamedQuery(name = "Cardedoxatencion.findByD2", query = "SELECT c FROM Cardedoxatencion c WHERE c.d2 = :d2"), @NamedQuery(name = "Cardedoxatencion.findByD3", query = "SELECT c FROM Cardedoxatencion c WHERE c.d3 = :d3"), @NamedQuery(name = "Cardedoxatencion.findByD4", query = "SELECT c FROM Cardedoxatencion c WHERE c.d4 = :d4"), @NamedQuery(name = "Cardedoxatencion.findByD5", query = "SELECT c FROM Cardedoxatencion c WHERE c.d5 = :d5"), @NamedQuery(name = "Cardedoxatencion.findByD6", query = "SELECT c FROM Cardedoxatencion c WHERE c.d6 = :d6"), @NamedQuery(name = "Cardedoxatencion.findByD7", query = "SELECT c FROM Cardedoxatencion c WHERE c.d7 = :d7"), @NamedQuery(name = "Cardedoxatencion.findByD8", query = "SELECT c FROM Cardedoxatencion c WHERE c.d8 = :d8"), @NamedQuery(name = "Cardedoxatencion.findByD9", query = "SELECT c FROM Cardedoxatencion c WHERE c.d9 = :d9"), @NamedQuery(name = "Cardedoxatencion.findByD10", query = "SELECT c FROM Cardedoxatencion c WHERE c.d10 = :d10")})
public class Cardedoxatencion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "observacion")
    private String observacion;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE)
    @Column(name = "idCarDedoxAtencion", nullable = false)
    private Integer idCarDedoxAtencion;
    @Column(name = "d1")
    private Boolean d1;
    @Column(name = "d2")
    private Boolean d2;
    @Column(name = "d3")
    private Boolean d3;
    @Column(name = "d4")
    private Boolean d4;
    @Column(name = "d5")
    private Boolean d5;
    @Column(name = "d6")
    private Boolean d6;
    @Column(name = "d7")
    private Boolean d7;
    @Column(name = "d8")
    private Boolean d8;
    @Column(name = "d9")
    private Boolean d9;
    @Column(name = "d10")
    private Boolean d10;
    @JoinColumn(name = "idCarDedo", referencedColumnName = "idCaracteristicaDedo")
    @ManyToOne
    private Caracteristicadedo idCarDedo;
    @JoinColumn(name = "idAtencion", referencedColumnName = "idAtencion")
    @ManyToOne
    private Atencion idAtencion;

    public Cardedoxatencion() {
    }

    public Cardedoxatencion(Integer idCarDedoxAtencion) {
        this.idCarDedoxAtencion = idCarDedoxAtencion;
    }

    public String getObservacion() {
        return observacion;
    }

    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }

    public Integer getIdCarDedoxAtencion() {
        return idCarDedoxAtencion;
    }

    public void setIdCarDedoxAtencion(Integer idCarDedoxAtencion) {
        this.idCarDedoxAtencion = idCarDedoxAtencion;
    }

    public Boolean getD1() {
        return d1;
    }

    public void setD1(Boolean d1) {
        this.d1 = d1;
    }

    public Boolean getD2() {
        return d2;
    }

    public void setD2(Boolean d2) {
        this.d2 = d2;
    }

    public Boolean getD3() {
        return d3;
    }

    public void setD3(Boolean d3) {
        this.d3 = d3;
    }

    public Boolean getD4() {
        return d4;
    }

    public void setD4(Boolean d4) {
        this.d4 = d4;
    }

    public Boolean getD5() {
        return d5;
    }

    public void setD5(Boolean d5) {
        this.d5 = d5;
    }

    public Boolean getD6() {
        return d6;
    }

    public void setD6(Boolean d6) {
        this.d6 = d6;
    }

    public Boolean getD7() {
        return d7;
    }

    public void setD7(Boolean d7) {
        this.d7 = d7;
    }

    public Boolean getD8() {
        return d8;
    }

    public void setD8(Boolean d8) {
        this.d8 = d8;
    }

    public Boolean getD9() {
        return d9;
    }

    public void setD9(Boolean d9) {
        this.d9 = d9;
    }

    public Boolean getD10() {
        return d10;
    }

    public void setD10(Boolean d10) {
        this.d10 = d10;
    }

    public Caracteristicadedo getIdCarDedo() {
        return idCarDedo;
    }

    public void setIdCarDedo(Caracteristicadedo idCarDedo) {
        this.idCarDedo = idCarDedo;
    }

    public Atencion getIdAtencion() {
        return idAtencion;
    }

    public void setIdAtencion(Atencion idAtencion) {
        this.idAtencion = idAtencion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCarDedoxAtencion != null ? idCarDedoxAtencion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cardedoxatencion)) {
            return false;
        }
        Cardedoxatencion other = (Cardedoxatencion) object;
        if ((this.idCarDedoxAtencion == null && other.idCarDedoxAtencion != null) || (this.idCarDedoxAtencion != null && !this.idCarDedoxAtencion.equals(other.idCarDedoxAtencion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.Cardedoxatencion[idCarDedoxAtencion=" + idCarDedoxAtencion + "]";
    }

}
